let timer = setInterval(function() {
    let osTop = document.documentElement.scrollTop || document.body.scrollTop;
    let ispeed = Math.floor(-osTop / 5);
    document.documentElement.scrollTop = document.body.scrollTop = osTop + ispeed;
    if (osTop === 0) {
      clearInterval(timer);
    }
  }, 30);